{extend name="common@create" /}

{block name="form"}
    <div class="layui-form-item">
      <button type="button" class="layui-btn" id="upload">
        <i class="layui-icon">&#xe67c;</i>上传文件
      </button>
    </div>
{/block}

{block name="myjs"}
<script>

layui.use('upload', function(){
  var upload = layui.upload;
   
  //执行实例
  var uploadInst = upload.render({
    elem: '#upload' //绑定元素
    ,url: "{$list.set.url}" //上传接口
    ,done: function(res){
      layer.msg(res.msg);
    }
    ,data: {
      text: '立项图片'
      ,serurl:'..\\public\\uploads\\keti\\lixiang\\'

    }
    ,multiple:true
    ,number:100
    ,acceptMime:'.jpg,.jpeg,.png'
    ,exts:'jpg|jpeg|png'
    ,auto:true
    ,error: function(){
      //请求异常回调
      layer.msg('上传错误');
    }
  });
});

</script>
{/block}

